/*
 * @Author: niuxb 951259738@qq.com
 * @Date: 2022-06-07 09:36:04
 * @LastEditors: niuxb 951259738@qq.com
 * @LastEditTime: 2022-06-24 09:58:05
 * @FilePath: /syq/src/api/newtodo.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/assets/js/request";
import util from "@/assets/js/public";
// 我的待办
export function getMytodo(params){
    return request({
        url:process.env.VUE_APP_URL+'/action/openapi/gbkcard/transmit/getVCList?name=getVCList&userName=wangjinguo&currentPage=' + params.currentPage + '&pageSize=' + params.pageSize,
        contentType:'application/json;charset=UTF-8',
        data:{
            "maip_secretField":"username",
            "username":util.encrypt(params.userName),
            "versionName":"2.7.73",
            "post":{
                "action":{
                    "name":"getVCList",
                    "pageSize":params.pageSize,
                    "userName":params.userName,
                    "currentPage":params.currentPage
                }
            }
        }
    })
}

export function getDecisions(params){
    return request({
        url:process.env.VUE_APP_URL+'/action/openapi/gbkcard/transmit/getVCNextFlow?name=getVCNextFlow&userName=wangjinguo' ,
        contentType:'application/json;charset=UTF-8',
        data:{
            "maip_secretField":"username",
            "username":util.encrypt(params.userName),
            "versionName":"2.7.73",
            "post":{
                "action":{
                    "actId":params.actId,
                    "name":"getVCNextFlow",
                    "nextFlow":params.nextFlow,
                    "userName":params.userName,
                    "actionCode":params.actionCode
                }
            }
        }
    })
}
export function getNextGroup(params){
    return request({
        url:process.env.VUE_APP_URL+'/action/openapi/gbkcard/transmit/getVCNextGroup?name=getVCNextGroup&userName=wangjinguo' ,
        contentType:'application/json;charset=UTF-8',
        data:{
            "maip_secretField":"username",
            "username":util.encrypt(params.userName),
            "versionName":"2.7.73",
            "post":{
                "action":{
                    "actId":params.actId,
                    "name":"getVCNextGroup",
                    "nextStep":params.nextStep,
                    "userName":params.userName,
                    "actionCode":params.actionCode
                }
            }
        }
    })
}


export function vcApproval(params){
    return request({
        url:process.env.VUE_APP_URL+'/action/openapi/gbkcard/transmit/VCApproval?name=VCApproval&userName=wangjinguo' ,
        contentType:'application/json;charset=UTF-8',
        data:{
            "maip_secretField":"username",
            "username":util.encrypt(params.userName),
            "versionName":"2.7.73",
            "post":{
                "action":{
                    "actId":params.actId,
                    "name":"VCApproval",
                    "nextStep":params.nextStep,
                    "userName":params.userName,
                    "nextGroup":params.nextGroup,
                    "actionCode":params.actionCode,
                    "opinion ":params.opinion ,
                    "nextPerson":params.nextPerson
                }
            }
        }
    })
}

export function getOrgAndUser(params){
    return request({
        url:process.env.VUE_APP_URL+'/action/openapi/gbkcard/transmit/getVCNextPerson?name=getVCNextPerson&userName=wangjinguo' ,
        contentType:'application/json;charset=UTF-8',
        data:{
            "maip_secretField":"username",
            "username":util.encrypt(params.userName),
            "versionName":"2.7.73",
            "post":{
                "action":{
                    "actId":params.actId,
                    "name":"getVCNextPerson",
                    "nextStep":params.nextStep,
                    "userName":params.userName,
                    "nextGroup":params.nextGroup,
                    "actionCode":params.actionCode
                }
            }
        }
    })
}


export function getVCOpinion(params){
    return request({
        url:process.env.VUE_APP_URL+'/action/openapi/gbkcard/transmit/getVCOpinion?name=getVCOpinion&userName=wangjinguo' ,
        contentType:'application/json;charset=UTF-8',
        data:{
            "maip_secretField":"username",
            "username":util.encrypt(params.userName),
            "versionName":"2.7.73",
            "post":{
                "action":{
                    "actId":params.actId,
                    "name":"getVCOpinion",
                    "nextStep":params.nextStep,
                    "userName":params.userName,
                    "nextGroup":params.nextGroup,
                    "actionCode":params.actionCode
                }
            }
        }
    })
}

// 详情
export function getDetail(params){
    return request({
        url:process.env.VUE_APP_URL+'/action/openapi/gbkcard/transmit/getVCDetail?name=getVCDetail&userName=wangjinguo' ,
        contentType:'application/json;charset=UTF-8',
        data:{
            "maip_secretField":"username",
            "username":util.encrypt(params.userName),
            "versionName":"2.7.73",
            "post":{
                "action":{
                    "actId":params.actId,
                    "name":"getVCDetail",
                    "pageSize":params.pageSize,
                    "userName":params.userName,
                    "currentPage":params.currentPage
                }
            }
        }
    })
}